<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="../../views/common/taglibs.jsp"%>

  <div class="search">
	    <form id="disburseOrderListFrm" name="disburseOrderListFrm" action="${appServer}/back/tran/queryDisburseOrder.htm" method="post" onsubmit="return false;">
		    <table width="99%" border="0" cellspacing="0" cellpadding="0">
				<tr>
		        <td>
		      	<th>
		      		消费订单号：
		      	</th>
		      	<td>
		      		<input type="text" class="fl" name="disburseNo" value="${disburse.disburseNo}"/>
		      	</td>
		      	<th>买家：</th>
		      	<td>
		      		<input type="text" class="fl" name="buyerMemberName" value="${disburse.buyerMemberName}"/>
		      	</td>
		        <th>卖家：</th>
		        <td>
		        	<input type="text" class="fl" name="sellerMemberName" value="${disburse.sellerMemberName}"/>
		        </td>
					<th>订单状态：</th>
					<td>
						<select class="userinfo" name="status" style="width: 90px;">
							<option value=-1>--请选择--</option>
							<option value=0 <c:choose><c:when test="${0 == disburse.status}">selected="selected"</c:when></c:choose>>订单创建</option>
							<option value=1 <c:choose><c:when test="${1 == disburse.status}">selected="selected"</c:when></c:choose>>代理商订单取消</option>
							<option value=2 <c:choose><c:when test="${2 == disburse.status}">selected="selected"</c:when></c:choose>>供货商无货拒接单</option>
							<option value=3 <c:choose><c:when test="${3 == disburse.status}">selected="selected"</c:when></c:choose>>供货商接单</option>
							<option value=4 <c:choose><c:when test="${4 == disburse.status}">selected="selected"</c:when></c:choose>>代理商已付款</option>
							<option value=5 <c:choose><c:when test="${5 == disburse.status}">selected="selected"</c:when></c:choose>>供货商已发货</option>
							<option value=6 <c:choose><c:when test="${6 == disburse.status}">selected="selected"</c:when></c:choose>>订单超时关闭</option>
							<option value=7 <c:choose><c:when test="${7 == disburse.status}">selected="selected"</c:when></c:choose>>支付凭证已上传</option>
							<option value=8 <c:choose><c:when test="${8 == disburse.status}">selected="selected"</c:when></c:choose>>支付凭证审核不通过</option>
						</select>
					</td>
					
					<td class="tc"><input class="btSearch" name="" type="button" onclick="searchDisburseOrderSubmit();" /></td>
				</tr>
		    </table>
	    </form>
  </div>
  
  <div class="tabtxet" id="listGameWind">
    <table class="tablist" cellspacing="0" cellpadding="0">
      <tr class="tabTop">
        <td colspan="21"><div class="title">消费订单(共<strong>${page.totalCounts}</strong>条)</div>
          </td>
      </tr>
      <tr>
        <th>消费订单号</th>
        <th>买家</th>
		<th>卖家</th>
        <th>订单状态</th>
        <th>拒绝理由</th>
        <th>结算总金额</th>
        <th>订单总金额</th>
        <th>结算人民币价格</th>
        <th>订单人民币价格</th>
        <th>结算原价</th>
        <th>订单原价</th>
        <th>数量</th>
        <th>汇率</th>
        <th>旧汇率</th>
        <th>货币单位</th>
        <th>详情</th>
        <th>提货方式</th>
        <th>收货地址</th>
       	<th>创建时间</th> 
       	<th>修改时间</th>
       	<th style="width: 120px;">操作</th>
      </tr>
      <c:forEach items="${disburseOrderList}" var="order" varStatus="status">
	      <tr>
	        <td>${order.disburseNo}</td>
	        <td>${order.buyerMemberName}</td>
			<td>${order.sellerMemberName}</td>
	        <td>${order.statusName}</td>
	        <td>${order.refuseReason}</td>
	        <td>${order.totalPriceShow}</td>
	        <td>${order.orderTotalPriceShow}</td>
	        <td>${order.snapshot.priceCnyShow}</td>
	        <td>${order.snapshot.finalPriceCnyShow}</td>
	        <td>${order.snapshot.priceShow}</td>
	        <td>${order.snapshot.finalPriceShow}</td>
	        
	        <td>${order.snapshot.quantity}</td>
	        <td>${order.snapshot.rateShow}</td>
	        <td>${order.snapshot.rateOldShow}</td>
	        <td>${order.snapshot.curno}</td>
	        <td width="60">
	            <c:forEach items="${order.skus}" var="sku" varStatus="status">
					${sku.skuName} ${sku.stock}<br>
				</c:forEach>
	        </td>
	        <td>${order.selfTakeName}</td>
	        <td>${order.addressDetail}</td>
	        <td>${order.timeAddStr}</td>
	        <td>${order.timeEditStr}</td>
	        <td>
                <c:choose>
                	<c:when test="${7 == order.status}">
                    &nbsp;
                        <a href="#" onclick="popGameModifyDiv('${order.disburseNo}');">审核支付凭证</a>
                    </c:when>
                	<c:when test="${7 == order.status}">
                    &nbsp;
                        <a href="${appServer}/back/tran/getDisburseOrder.htm?disburseNo=${order.disburseNo}">审核支付凭证</a>
                    </c:when>
                </c:choose>
            </td>
	      </tr>
      </c:forEach>
      <tr>
      	<td colspan="21">
	      	共${page.totalPages}页 
	      	第${page.pageNum}页 
	      	<c:if test="${!page.showFirst}">首页</c:if>
	      	<c:if test="${page.showFirst}"><a href="#" onclick="doActionNoCallback('core', '${appServer}/back/tran/queryDisburseOrder.htm?pageNum=1', disburseOrderListParamNoPage);">首页</a></c:if>
	      	<c:if test="${!page.showPrevious}">上一页</c:if>
	      	<c:if test="${page.showPrevious}"><a href="#" onclick="doActionNoCallback('core', '${appServer}/back/tran/queryDisburseOrder.htm?pageNum=${page.pageNum-1}', disburseOrderListParamNoPage);">上一页</a></c:if>
	      	<c:if test="${!page.showNext}">下一页</c:if>
	      	<c:if test="${page.showNext}"><a href="#" onclick="doActionNoCallback('core', '${appServer}/back/tran/queryDisburseOrder.htm?pageNum=${page.pageNum+1}', disburseOrderListParamNoPage);">下一页</a></c:if>
	      	<c:if test="${!page.showLast}">尾页</c:if>
	      	<c:if test="${page.showLast}"><a href="#" onclick="doActionNoCallback('core', '${appServer}/back/tran/queryDisburseOrder.htm?pageNum=${page.totalPages}', disburseOrderListParamNoPage);">尾页</a></c:if>
      	</td>
      </tr>
    </table>
  </div>

	<div id="disburseOrderPopWindow"></div>
    <iframe id="upload-iframe" name="upload-iframe" height="0" width="0"></iframe>
	<script type="text/javascript">
	
		disburseOrderListParamNoPage = {'disburseNo' : '${disburse.disburseNo}', 'buyerMemberName' : '${disburse.buyerMemberName}','sellerMemberName' : '${disburse.sellerMemberName}'};
		
    </script>